import 'package:fluro/fluro.dart';
import 'package:jyofservice/fluro/Application.dart';
import 'package:flutter/material.dart';
import 'package:jyofservice/fluro/Routes.dart';
import 'package:jyofservice/fluro/fluro_convert_util.dart';

class NavigatorUtil {
  //返回
  static void goBack(BuildContext context) {
    Application.router.pop(context);
  }

  //欢迎界面
  static void goWelcome(BuildContext context) {
    Application.router.navigateTo(context, Routes.root, replace: true);
  }

  //主界面
  //replace：true 就是将 前一 页面给移除掉了，这点后退键的时候就不会再出现前一页面
  static void goHome(BuildContext context) {
    Application.router.navigateTo(context, Routes.home, replace: true);
  }

  //主界面
  //replace：true 就是将 前一 页面给移除掉了，这点后退键的时候就不会再出现前一页面
  static void goSF(BuildContext context) {
    Application.router.navigateTo(context, Routes.sf, replace: true);
  }
  //登录界面
  static void goLogin(BuildContext context) {
    Application.router.navigateTo(context, Routes.login, replace: true);
  }

  //设置界面
  static void goMine(BuildContext context){
    Application.router.navigateTo(context, Routes.mine);
  }

  //工单处理界面
  static void goGongDanChuLi(BuildContext context) {

    Application.router.navigateTo(context, Routes.gongdanchuli);

  }

  //工单调度界面
  static void goGongDanDiaoDu(BuildContext context,String view,String title) {
    title = FluroConvertUtils.fluroCnParamsEncode(title);
    Application.router.navigateTo(context, Routes.gongdandiaodu+"?view=$view&title=$title");

  }

  //工单调度详情界面
static void goDiaoDuDetail(BuildContext context,String LSH,bool isOffstage,String view){
  Application.router.navigateTo(context, Routes.gongdandiaodudetail+"?LSH=$LSH&is0ffstage=$isOffstage&view=$view");
}
  //工单日志
  static void goWorkRecord(BuildContext context,String LSH){
    Application.router.navigateTo(context, Routes.workRecord+"?LSH=$LSH");
  }

  //历史工单
  static void goHistoryMenu(BuildContext context,String sfbm,String xq_id){
    Application.router.navigateTo(context, Routes.histroy+"?sfbm=$sfbm&xqid=$xq_id");
  }

  //同单元工单
  static void goCommonUnit(BuildContext context,String sfbm,String xq_id){
    Application.router.navigateTo(context, Routes.commonUnit+"?sfbm=$sfbm&xqid=$xq_id");
  }

  //通话记录
  static void goCallRecord(BuildContext context){
    Application.router.navigateTo(context, Routes.callRecord);
  }

  //统计查询
  static void goTongJiChaXun(BuildContext context){
    Application.router.navigateTo(context, Routes.tongJiChaXun);
  }

  //坐席监管
  static void goSeatCharge(BuildContext context){
    Application.router.navigateTo(context, Routes.seatCharge);
  }
  //签到
  static void goSign(BuildContext context){
    Application.router.navigateTo(context, Routes.sign);
  }
  //稽查管理
  static void goJiCha(BuildContext context){
    Application.router.navigateTo(context, Routes.jicha);
  }
  //运行工况的详情
  static void goJpushMsg(BuildContext context){
    Application.router.navigateTo(context, Routes.jpushMsg);
  }
}
